package cn.edu.sgu.www.mhxysy.dto;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author heyunlin
 * @version 1.0
 */
@Data
public class AccountDTO implements Serializable {
    private static final long serialVersionUID = 18L;

    /**
     * 账号ID
     */
    private String id;

    /**
     * 账号
     */
    @NotEmpty(message = "账号不能为空")
    private String account;

    /**
     * 安全手机
     */
    @NotEmpty(message = "安全手机不能为空")
    @Pattern(regexp = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,2-9]))\\d{8}$", message = "无效的手机号")
    private String phone;
}